﻿Imports tiendaRegalos

Public Class IngresarUsuario
    Private Sub IngresarUsuario_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim negocio As New UsuarioNegocio()

        Try

            Dim modelo = negocio.insertar(1234, Me.txtRol.Text, Me.txtName.Text, Me.txtCorreo.Text, Me.txtPaterno.Text, Me.txtMaterno.Text, Me.txtDNI.Text, Me.txtDireccion.Text, Me.txtNac.Text, Me.txtEstado.Text, Me.txtClave.Text, Me.txtTelefono.Text, Me.txtCiudad.Text)
            MsgBox("USTED SE HA REGISTRADO CORRECTAMENTE!!!")

        Catch ex As DAOExcepcion
            MsgBox(ex.ToString)
        End Try
    End Sub

    Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
        Me.txtRol.Text = ""
        Me.txtName.Text = ""
        Me.txtCorreo.Text = ""
        Me.txtPaterno.Text = ""
        Me.txtMaterno.Text = ""
        Me.txtDNI.Text = ""
        Me.txtDireccion.Text = ""
        Me.txtNac.Text = ""
        Me.txtEstado.Text = ""
        Me.txtClave.Text = ""
        Me.txtTelefono.Text = ""
        Me.txtCiudad.Text = ""
    End Sub

    Private Sub txtRol_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles txtRol.TextChanged

    End Sub
End Class